package org.zgy.stock.utils;

public class WorkerIdHolder {
    private static final ThreadLocal<Long> WORKER_ID = new ThreadLocal<>();

    public static void setWorkerId(long id) {
        WORKER_ID.set(id);
    }

    public static long getWorkerId() {
        return WORKER_ID.get();
    }

    public static void clear() {
        WORKER_ID.remove();
    }
}
